Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwraps #77

Merged
merged 2 commits into from
Apr 19, 2023
Merged

unwraps #77

merged 2 commits into from
Apr 19, 2023

Conversation

volovyks
Copy link
Collaborator

No description provided.

@volovyks volovyks requested a review from itegulov April 19, 2023 11:52
Comment on lines 25 to 31
match decode::<IdTokenClaims>(token, &decoding_key, &validation) {
Ok(token_data) => Ok(token_data.claims),
Err(e) => Err(format!("Failed to validate the token: {}", e)),
Err(err) => {
tracing::error!("Failed to validate the token: {}", err);
Err(anyhow::anyhow!("Failed to validate the token: {}", err))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just do .map(|t| t.claims)? here and not bother with matching

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are other unwraps in this file, but not a big deal since they are only ran once on startup

@volovyks volovyks merged commit 32bc1eb into develop Apr 19, 2023
@itegulov itegulov deleted the serhii/unwraps branch July 20, 2023 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants